//
//  WDAdStatusManager.h
//  WDPolymerizeSDK
//
//  Created by little People on 2023/6/1.
//

#import <Foundation/Foundation.h>
#import "WDNSLog.h"

typedef enum ADIsShow {
    HasAdShow,
    NoAdShow
} ADIsShow;

NS_ASSUME_NONNULL_BEGIN

#define SPLASH_EVENT_NAME   @"AD_Splash"
#define INTER_EVENT_NAME    @"AD_Inter"
#define RV_EVENT_NAME       @"AD_RV"
#define BANNER_EVENT_NAME   @"AD_Banner"
#define CARD_EVENT_NAME     @"AD_CARD"
#define NATIVE_EVENT_NAME   @"AD_Native"
#define SELF_EVENT_NAME     @"AD_Self"
#define REVENUE_EVENT_NAME  @"AD_Revenue"

#define BILLING_EVENT_NAME         @"iap"

@interface WDAdStatusManager : NSObject

@property (nonatomic, assign)ADIsShow adIsShow;

+ (instancetype)shareStatusManager;

//收到客户端发起的展示请求
- (void)adRequestWithEventName:(NSString *)eventName;

//开始加载
- (void)adLoadWithEventName:(NSString *)eventName;

//加载失败
- (void)adLoadFailedWithCode:(NSInteger)code message:(NSString *)message eventName:(NSString *)eventName;

//填充成功
- (void)adLoadFillSuccessWithEventName:(NSString *)eventName;

//填充失败
- (void)adLoadFillFailedWithEventName:(NSString *)eventName;

//开始展示
- (void)adShowWithEventName:(NSString *)eventName;

//展示失败code message
- (void)adShowFailedWithCode:(NSInteger)code message:(NSString *)message eventName:(NSString *)eventName;

//展示完成
- (void)adCompletedWithEventName:(NSString *)eventName;

//点击
- (void)adClickWithEventName:(NSString *)eventName;

//关闭
- (void)adCloseWithEventName:(NSString *)eventName;

//收入统计
- (void)adRevenue:(NSString *)type source:(NSString *)source revenue:(NSString *)revenue currency:(NSString *)currency;

- (void)customAdShowWithEventName:(NSString *)eventName package:(NSString *)package creative:(NSString *)creative;

- (void)customAdClickWithEventName:(NSString *)eventName package:(NSString *)package creative:(NSString *)creative;

- (void)cardAdClickWithEventName:(NSString *)eventName adType:(NSString *)type;

//type:本次实际展示的广告类型 5-native 6-自推广
- (void)cardAdShowWithEventName:(NSString *)eventName adType:(NSString *)type;

- (void)inAppPurchaseRequestWithEvent:(NSString *)eventName productId:(NSString *)productId;

- (void)inAppPurchaseSuccessWithEvent:(NSString *)eventName productId:(NSString *)productId;

- (void)inAppPurchaseFailedWithEvent:(NSString *)eventName productId:(NSString *)productId errorType:(NSString *)type errorMsg:(NSString *)msg;

- (void)inAppPurchaseRevenueWithEvent:(NSString *)eventName type:(NSString *)type source:(NSString *)source revenue:(NSString *)revenue d_revenue:(NSString *)d_revenue currency:(NSString *)currency;

- (void)inAppPurchaseRevenueRecordWithEvent:(NSString *)eventName type:(NSString *)type productName:(NSString *)productName orderId:(NSString *)orderId revenue:(NSString *)revenue d_revenue:(NSString *)d_revenue currency:(NSString *)currency isSuccess:(BOOL)isSuccess failureReason:(NSString *)failureReason;

@end

NS_ASSUME_NONNULL_END
